home *** CD-ROM | disk | FTP | other *** search
/ Practical Web Pages 2004 September / PracticalWebPages-WPG13-09-2004-Coverdisc.iso / pc / Software / Toolkit / Sothink SWF Quicker 1.5 / data1.cab / Public_Files / Classes / TextSnapshot.as < prev    next >
Encoding:
Text File  |  2004-06-14  |  1.8 KB  |  13 lines

  1. class TextSnapshot
  2. {
  3.  
  4.     function findText(startIndex, textToFind, caseSensitive)             // Searches the specified "TextSnapshot" object and returns the position of the first occurrence of "textToFind" found at or after "startIndex". If "textToFind" is not found, the method returns -1.
  5.     function getCount()                                                  // Returns the number of characters in a TextSnapshot object.
  6.     function getSelected(from, to)                                       // Specifies whether a TextSnapshot object contains selected text in the specified range. 
  7.     function getSelectedText(includeLineEndings)                         // Returns a string that contains all the characters specified by this method. If no characters are selected, an empty string is returned. 
  8.     function getText(from, to, includeLineEndings)                       // Returns a string that contains all the characters specified by the "from" and "to" parameters. If no characters are selected, an empty string is returned. 
  9.     function hitTestTextNearPos(x, y, maxDistance)                       // Lets you determine which character within a TextSnapshot object is on or near specified x, y coordinates of the movie clip containing the text in "my_snap".
  10.     function setSelectColor(hexColor)                                    // Specifies the color to use when highlighting characters that have been selected with the "TextSnapshot.setSelected()" command. The color is always opaque; you can't specify a transparency value.
  11.     function setSelected(from, to, select)                               // Specifies a range of characters in a TextSnapshot object to be selected or deselected. Characters that are selected are drawn with a colored rectangle behind them, matching the bounding box of the character. The color of the bounding box is defined by TextSnapshot.setSelectColor().
  12. }
  13.